﻿Public Class FormOper
    Dim objGtProcedureDetails As New clsGtProcedureDetails
    Public b_gt_sys_id As String
    Public oper_type As String

    Private Sub FormOper_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        setDgvOperData()
    End Sub

    Public Sub setDgvOperData()
        Dim dtDetails1 As New DataTable
        If String.IsNullOrEmpty(b_gt_sys_id) = False Then
            dtDetails1 = objGtProcedureDetails.getGtProcedureDetailsList(b_gt_sys_id)
            dtDetails1.Columns.Add("procedure_no_name")
            If dtDetails1.Rows.Count > 0 Then
                For Each row As DataRow In dtDetails1.Rows
                    If oper_type.Equals("0") Then
                        If row("procedure_no") = "1" Then
                            row("procedure_no_name") = "校平"
                        End If
                        If row("procedure_no") = "2" Then
                            row("procedure_no_name") = "喷砂清洗"
                        End If
                        If row("procedure_no") = "3" Then
                            row("procedure_no_name") = "六工位"
                        End If
                    End If
                    If oper_type.Equals("1") Then
                        If row("procedure_no") = "1" Then
                            row("procedure_no_name") = "喷砂清洗"
                        End If
                        If row("procedure_no") = "2" Then
                            row("procedure_no_name") = "三工位"
                        End If
                    End If
                Next
            End If
        End If
        dgvOper.AutoGenerateColumns = False
        dgvOper.DataSource = dtDetails1
    End Sub

End Class